<template>
  <div class="content">
    <div class="reset_box">
      <p>你是否记得<span>{{tel | totel}}</span></p>
      <p>当前使用的支付密码</p>
    </div>
    <div class="reset_btn"><button @click="forget()" class="forget">不记得</button><button class="remember" @click="remember()">记得</button></div>
  </div>
</template>

<script>
import { MessageBox } from 'mint-ui'
export default {
  data () {
    return {
      tel: ''
    }
  },
  mounted () {
    this.$apiPost('userinfo',{}).then((data) => {
      this.tel = data.data.account_info.phone
    })
  },
  filters: {
    totel (str) {
      return `${str.slice(0, 3)}*****${str.slice(-4)}`
    }
  },
  methods: {
    forget () {
      MessageBox('提示', '支付密码忘记暂不支持线上更改，请联系客服400000')
    },
    remember () {
      this.$router.push('/test_pwd')
    }
  }
}
</script>
<style scoped lang = 'scss'>
.reset_box{
  width: 100%;
  padding:32px 0 32px 0;
  background: #fff;
  text-align: center;
  margin-top:10px;
  p{
    color: #999;
    font-size: 15px;
    line-height: 22px;
    span{
      font-size: 18px;
      color: #333;
      font-weight: 600
    }
  }
}
.reset_btn{
  width: 100%;
  margin-top: 20px;
  padding: 0 15px 0 15px;
.forget,.remember{
  width: 48%;
  height: 42px;
  border-radius: 5px;
  font-size: 18px;
}
.forget{
  background: #fff;
  border: node;
}
.remember{
  background: #78D041;
  color: #fff;
  margin-left:10px;
}
}
</style>
